﻿using System;
using System.Web;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;

//using SBPweb.PROvibe.Server.Framework.Communication;
using SBPweb.PROvibe.Server.Framework.Session;

namespace SBPweb.PROvibe.Server.Host.Services
{

    //public class PollingDuplexFactory : PollingDuplexServiceHostFactory<IServerChannel, ServerChannel>
    //{

    //    private object o;

    //    public PollingDuplexFactory()
    //    {
    //        //o = SessionManager.SessionIdentifier;
    //    }

    //    public override ServiceHostBase CreateServiceHost(string constructorString, Uri[] baseAddresses)
    //    {
    //        PollingDuplexServiceHost<IServerChannel, ServerChannel> ret = (PollingDuplexServiceHost<IServerChannel, ServerChannel>)base.CreateServiceHost(constructorString, baseAddresses);
    //        ret.ChannelOpened += new EventHandler<ChannelEventArgs>(ret_ChannelOpened);
    //        return ret as ServiceHostBase;
    //    }

    //    private void ret_ChannelOpened(object sender, ChannelEventArgs e)
    //    {
    //        //ClientSessionManager.CommunicationChannel = e.Channel;
    //    }

    //}

}